<%= pref_with_text_field('prefs', 'date_format') %>

<div class='prefs_example'><%= I18n.t('preferences.result_in') %> <span id='prefs.date_format'><%= l(Time.zone.today, :format => current_user.prefs.date_format) %></span></div>
<br/>
<%= I18n.t('preferences.pick_one') %><br/>
<div class="form-group btn-group" role="group" data-toggle="buttons">
  <% [:default, :short, :long, :longer].each do |format| %>
    <label class="btn btn-default">
      <%= radio_button_tag("date_picker1", t("date.formats.#{format}")) %>
      <%= l(Time.zone.today, format: format) %>
    </label>
  <% end %>
</div>
<div class="form-group">
  <%= pref_with_text_field('prefs', 'title_date_format') %>
</div>
<div class='prefs_example'><%= I18n.t('preferences.result_in') %> <span id='prefs.title_date_format'><%= l(Time.zone.today, :format => current_user.prefs.title_date_format) %></span></div>
<br/>
<%= I18n.t('preferences.pick_one') %><br/>
<div class="form-group btn-group" role="group" data-toggle="buttons">
  <% [:default, :short, :long, :longer].each do |format| %>
    <label class="btn btn-default">
      <%= radio_button_tag("date_picker2", t("date.formats.#{format}")) %>
      <%= l(Time.zone.today, format: format) %>
    </label>
  <% end %>
</div>
<br/>

<div class="form-group">
  <%= pref('prefs', 'time_zone') { time_zone_select('prefs','time_zone', [], {}, class: "form-control") } %>
</div>

<div class="form-group">
  <%= pref_with_select_field('prefs', "week_starts", (0..6).to_a.map {|num| [t('date.day_names')[num], num] }) %>
</div>
